#ifndef INTROSTATE_H
#define INTROSTATE_H

#include <Ouden.h>

class CIntroState : public ouden::CGameState, public ouden::CSingleton<CIntroState>
{
public:
		
		//Events called by a game manager
		virtual void onEnter();
		virtual void onExit();
		virtual void onPause() 								{}
		virtual void onResume() 								{}
		
		virtual bool onTick(ouden::CGameTimer* pTimer);
		virtual bool onFrameStart(ouden::CGameTimer* pTimer);
		
		virtual bool frameEnded();
		
		virtual void onUnBufInput(ouden::IInputDevice* pInput) 		{}
		virtual void onKeyDown(ouden::KeyCode iKey);
		virtual void onKeyUp(ouden::KeyCode iKey) 		{}
		virtual void onKeyPress(ouden::KeyCode iKey) 	{}
		virtual void onMouseMove(ouden::Vector vPos, ouden::MouseButton iButtonState) 		{}
		virtual void onMouseButtonDown(ouden::Vector vPos, ouden::MouseButton iButton) 		{}
		virtual void onMouseButtonUp(ouden::Vector vPos, ouden::MouseButton iButton) 		{}
		virtual void onMouseButtonPress(ouden::Vector vPos, ouden::MouseButton iButton) 	{}
		
		CIntroState();
		~CIntroState();
		
protected:
	
private:
	
	//Should we exit the game next frame?
	bool m_bExit;
	
	//Log output file for whole game
	//TODO: Think about moving to some main game (singleton) class as this is 
	// used throughout the whole game
	std::fstream m_fsLogFile;
	
	//Rectangle used for fading the screen
	Ogre::Rectangle2D* m_pFadeRect;
	
	//Index of the current screen
	int m_iCurScreen;
	
	//Array of Ogre overlays of the intro screens to display
	Array<Ogre::Overlay*> m_pIntroScreens;
	
};

#endif // INTROSTATE_H
